<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* html{
            font-size: 300px;
        } */
        div{
            width: 750px;
            background-color: antiquewhite;
        }
    </style>
</head>
<body>
    <div></div>
    rem
    <script>
        var vw = window.innerWidth;
        var rem = vw/750;
        var root = document.getElementsByTagName("html")[0];
        root.style.fontSize = rem+"px";
        console.log(rem);
        window.onresize = function(){
            var vw = window.innerWidth;
            root.style.fontSize = vw/750+"px"
        }
    </script>
</body>
</html>